﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExcelDna.Integration;
using Excel = Microsoft.Office.Interop.Excel;
using CrystalWind.Example.ExcelDna.CustomerExtentions;
using ExcelDna.Registration;

namespace CrystalWind.Example.ExcelDna
{
    public class ExampleCommand
    {
        /// <summary>
        /// 在Command中可以直接使用SetValue
        /// 启动后,在功能区"加载项"中出现菜单Test,下拉子项为Set B3
        /// </summary>
        [ExcelCommand(MenuName = "Test", MenuText = "Set B3",ExplicitRegistration =false)]
        public static void Commnad1()
        {
            var ef1 = DnaExtentions.GetExcelReference("Sheet1", "A1:C3");
            var ef2 = DnaExtentions.GetExcelReference("Sheet1", "H1");

            ef2.Resize(ef1).SetValue(ef1.GetValue());
        }



    }
}
